var pattern = /!2/,
	str = 'sss';
console.log(pattern.test(str));